Page({
    data: {
        selectedEdu: {},
        pkgList: []
    },
    onLoad: function(t) {
        var e = this;
        this.getOpenerEventChannel().on("eduList", function(t) {
            var n = t.actionCode, a = t.list;
            e.setData({
                selectedEdu: a.find(function(t) {
                    return t.actionCode + "" == n + "";
                }) || {},
                pkgList: a
            });
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    selectEdu: function(t) {
        var e = t.currentTarget.dataset.index, n = this.data.pkgList[e];
        this.setData({
            selectedEdu: n
        });
    },
    gotoDetail: function(t) {
        var e = t.currentTarget.dataset.index;
        wx.navigateTo({
            url: "/pages/superMemberGold/eduDetail/eduDetail?actionCode=" + this.data.pkgList[e].actionCode
        });
    },
    confirm: function() {
        this.data.selectedEdu.actionCode && (this.getOpenerEventChannel().emit("select", this.data.selectedEdu.actionCode), 
        wx.navigateBack({
            delta: 1
        }));
    }
});